
import { _decorator, CCInteger, Sprite, SpriteFrame } from 'cc';
import { RenderManager } from '../Base/RenderManager';
import DataManager from '../Runtime/DataManager';
const { ccclass, property } = _decorator;

@ccclass('ContentManager')
export class ContentManager extends RenderManager {
    @property(SpriteFrame)
    nomalSf: SpriteFrame = null;
    @property(SpriteFrame)
    successSf: SpriteFrame = null;
    @property(CCInteger)
    index: number = 0;
    render(): void {
        this.node.getComponent(Sprite).spriteFrame = DataManager.Instance.H2AData[this.index] === DataManager.Instance._H2AAnswer[this.index] ? this.successSf : this.nomalSf;
    }
}